Crude oil produced from a reservoir can contain various impurities, such as sand, salts, drilling mud, corrosion byproducts, and debris. Calcium, sodium, and magnesium chlorides are some common salts that can be present in crude oil. The amount of salt content in crude oil can vary depending on the source of crude oil. The salt in crude oil is typically not carried by the crude oil itself; rather, the salt is dissolved in water droplets that are dispersed in the crude oil. In some cases, crude oil can contain crystalline salt which can form due to changes in temperature and pressure. These salts can cause problems in production and refining. For example, the presence of salts can result in solid precipitation and formation of scale on process equipment. The presence of salt in water can also accelerate corrosion in piping and equipment. When salts are dissolved in water, high temperatures in processing units can potentially cause water hydrolysis, which can allow the formation of corrosive hydrochloric acid. Salt components can also poison catalysts in downstream processes. For at least these reasons, crude oil undergoes a desalting process to reduce the salt content of the crude oil to acceptable levels.